package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysOrderTrendMapper;
import com.ruoyi.system.domain.SysOrderTrend;
import com.ruoyi.system.service.ISysOrderTrendService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单趋势Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-20
 */
@Service
public class SysOrderTrendServiceImpl implements ISysOrderTrendService 
{
    @Autowired
    private SysOrderTrendMapper sysOrderTrendMapper;

    /**
     * 查询订单趋势
     * 
     * @param id 订单趋势主键
     * @return 订单趋势
     */
    @Override
    public SysOrderTrend selectSysOrderTrendById(Long id)
    {
        return sysOrderTrendMapper.selectSysOrderTrendById(id);
    }

    /**
     * 查询订单趋势列表
     * 
     * @param sysOrderTrend 订单趋势
     * @return 订单趋势
     */
    @Override
    public List<SysOrderTrend> selectSysOrderTrendList(SysOrderTrend sysOrderTrend)
    {
        return sysOrderTrendMapper.selectSysOrderTrendList(sysOrderTrend);
    }

    /**
     * 新增订单趋势
     * 
     * @param sysOrderTrend 订单趋势
     * @return 结果
     */
    @Override
    public int insertSysOrderTrend(SysOrderTrend sysOrderTrend)
    {
        return sysOrderTrendMapper.insertSysOrderTrend(sysOrderTrend);
    }

    /**
     * 修改订单趋势
     * 
     * @param sysOrderTrend 订单趋势
     * @return 结果
     */
    @Override
    public int updateSysOrderTrend(SysOrderTrend sysOrderTrend)
    {
        return sysOrderTrendMapper.updateSysOrderTrend(sysOrderTrend);
    }

    /**
     * 批量删除订单趋势
     * 
     * @param ids 需要删除的订单趋势主键
     * @return 结果
     */
    @Override
    public int deleteSysOrderTrendByIds(String ids)
    {
        return sysOrderTrendMapper.deleteSysOrderTrendByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除订单趋势信息
     * 
     * @param id 订单趋势主键
     * @return 结果
     */
    @Override
    public int deleteSysOrderTrendById(Long id)
    {
        return sysOrderTrendMapper.deleteSysOrderTrendById(id);
    }
}
